<?php
/**
 * Created by PhpStorm.
 * User: fengke
 * Date: 2018/12/6
 * Time: 14:27
 */

namespace app\api\controller;


use app\common\controller\Api;
use app\common\library\book\dstiejuanCollect;

class ReadRecord extends Api
{
    // 无需登录的接口,*表示全部
    protected $noNeedLogin = '*';
    // 无需鉴权的接口,*表示全部
    protected $noNeedRight = '*';
    private $model;
    public function _initialize()
    {
        parent::_initialize();
        $this->model = new \app\common\model\ReadRecord();
    }

    public function addReadRecord(){
        $param = $this->request->request();
        $this->model = new \app\common\model\ReadRecord();
        $last_id = $this->model->add($param);
        if(!$last_id){
            $this->error('查看失败，请稍后重试');
        }
        $this->success('添加成功',['Id' => $last_id]);
    }
}